<!--  Nguyen Huu Nhat -->
<?php 
@session_start();
include '../Security/CheckAdmin.php';
include '../DataBase/ConnectDB.php';
 include '../Home/DefineVar.php';
 mysql_select_db(MYSQL_DATABASE,$link);
 $roomId = mysql_real_escape_string($_GET['roomId']);
 //print("<br>lla ".$roomId);
	$query = "SELECT * FROM ".MYSQL_TABLE_ROOMINFOR." WHERE roomId ='$roomId';";
	//print("<br>".$query);
        $result = mysql_query($query, $link);
        if($result){
        	$resultroom = mysql_fetch_row($result);
        }
?>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head><body>
<!--会議室の更新情報を入力する画面-->
<h1>会議室更新</h1>
<form action = 'UpdateRoomEx.php' method='post'>
<table>
<tr><td>会議室名</td>
<td><input type='text' name='roomName' <?php echo "value ='".$resultroom[0]."'"; ?>></td>
</tr>

<tr><td>席数</td>
<td><input type='text' name='chairNumber' <?php echo "value ='".$resultroom[1]."'"; ?>></td>
</tr>

<tr><td>使用料</td>
<td><input type='text' name='useFee' <?php echo "value ='".$resultroom[2]."'"; ?>></td>
</tr>

<tr><td>キャンセル料</td>
<td><input type='text' name='cancelFee' <?php echo "value ='".$resultroom[4]."'"; ?>></td>
<td><input type=checkbox value=true name='cancelFeeAll'>オール更新</td>
</tr>

<tr><td>罰金</td>
<td><input type='text' name='fineFee' <?php echo "value ='".$resultroom[3]."'"; ?>></td>
<td><input type=checkbox value=true name='fineFeeAll'>オール更新</td>
</tr>

<tr><td>予約手数料</td>
<td><input type='text' name='orderFee' <?php echo "value ='".$resultroom[5]."'"; ?>></td>
<td><input type=checkbox value=true name='orderFeeAll'>オール更新</td>
</tr>
<tr>
<td>会議室状態</td>
<td><select name="roomStatus">
<option value=0 >故障</option>
<option value=1 <?php if($resultroom[6]) echo "selected";?> >使用</option>
</select> 
</td>
</tr>
</table>
<input type='hidden' name='roomId' <?php echo "value ='".$roomId."'"; ?> />
<input type='submit' name='delete' value='削除' />
<input type='submit' name='submit' value='更新' />
</form>	
</body></html>
